// 域A设置
localStorage.setItem('transfer_data', JSON.stringify(data));

// 打开域B时通过URL参数传递
window.open(`https://domain-b.com?data=${encodeURIComponent(localStorage.getItem('transfer_data'))}`);